up: AutoCAD - Dialog Control Language (DCL)  
AutoCAD - Dialog Control Language (DCL)
(action_tile key action-expression)
What links here?
Assigns an action to evaluate when the user selects the specified tile in a dialog box

(action_tile key action-expression)


The action assigned by action_tile supersedes the dialog box's default action (assigned by new_dialog) or the tile's action attribute, if these are specified. The expression can refer to the tile's current value as $value, its name as $key, its application-specific data (as set by client_data_tile ) as $data, its callback reason as $reason, and its image coordinates (if the tile is an image button) as $x and $y.

Arguments
key
A string that names the tile that triggers the action (specified as its key attribute). This argument is case-sensitive.
action-expression
A string naming the expression evaluated when the tile is selected.

Return Values
Returns T

The $reason variable will be one of:
1This is the value for most action tiles. The user has selected the tile (possibly by pressing Enter, if the tile is the default and the platform recognizes accelerator keys).
2Edit boxes: The user has exited the edit box, but has not made a final selection.
3Sliders: The user has changed the value of the slider by dragging the indicator but has not made a final selection.
4List boxes and image buttons: This callback reason always follows a code 1. It usually means “commit to the previous selection.” It should never undo the previous selection; this confuses and annoys the user.


For text boxes, the action-expression is evaluated when the focus leaves the text box.

Sample:
(action_tile "accept" "(do_exit)")


The quotes around the key and action-expression are essential.

(action_tile "myeditbox" "(edit_action $value $reason)")


This sample shows the use of the special variables.
AutoCAD - Dialog Control Language (DCL) - (action_tile key action-expression)
filename:AutoCAD - Dialog Control Language (DCL) - (action_tile key action-expression)
filename:AutoCAD%20%2D%20Dialog%20Control%20Language%20%28DCL%29%20%2D%20%28action_tile%20key%20action%2Dexpression%29
last edit:August 01 2013 21:20:06 (3929 days ago)
ct = 1714956413.000000 = May 05 2024 20:46:53
ft = 1375406406.000000 = August 01 2013 21:20:06
dt = 339550007.000000